home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16911 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.9 KB

  1. Path: scoop.eco.twg.com!usenet
  2. From: mike@vishnu.eco.twg.com (This space intentionally left blank)
  3. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  4. Subject: Re: Young programmers read me.
  5. Date: 12 Apr 1996 17:14:26 GMT
  6. Organization: The Wollongong Group
  7. Message-ID: <4km31i$6q6@scoop.eco.twg.com>
  8. References: <4icpp9$7hr@barad-dur.nas.com>
  9.     <aidan-0404961557290001@meathook.intac.com> <3165AD94.6F3A@datalytics.com>
  10.     <j-jahnke-0604960016160001@ntcs-ip8.uchicago.edu> <4keejc$lpi@tpd.dsccc.com>
  11.     <Pine.OSF.3.91.960411093444.20958D-100000@bud.cc.swin.edu.au>
  12.     <gfarrow.829193316@rainbow> <4kj3rp$11d@news1.mnsinc.com>
  13. NNTP-Posting-Host: vishnu.eco.twg.com
  14.  
  15. In article <4kj3rp$11d@news1.mnsinc.com>, keys@mnsinc.com (Paul Speed) writes:
  16. >Glenn Farrow (gfarrow@rainbow.rmii.com) wrote:
  17. >: John Joseph Newbigin <079519@bud.cc.swin.edu.au> writes:
  18. >
  19.   <snip!>
  20.  
  21. >void foo(int i, char *list){int t;for(t=0;t<i;t++){printf("#%i",t);
  22. >printf("%s\n",list[t]);}printf("%i total.\n",t);}
  23. >
  24. >    Wow!  Look at how much space that saved.  I could put all my code 
  25. >in just two or three pages.  :)  I much prefer.
  26. >
  27. >/* Function to do nothing 
  28. > * Parms:  i = num of items, list = list of items */
  29. >void foo(int i, char *list)
  30. >{
  31. >    int t;
  32. >
  33. >    /* Go through entire list */
  34. >    for(t = 0; t < i; t++)
  35. >    {
  36. >        /* Write the item to stdout */
  37. >        printf("#%i ", t);
  38. >        printf("%s\n", list[t]);
  39. >    }
  40. >
  41. >    /* Sum it up */
  42. >    printf("%i total.\n", t);
  43. >}
  44. >
  45. >    When you waste brain cycles to decipher code that's been crammed 
  46. >together, you lose some cycles you could have been using to do something 
  47. >else.
  48.  
  49. Rather than waste time and typing with the "my favorite formating style
  50. rulz!" arguments, why not write a code beautifier that can take any legal
  51. syntax and format it according to rules in a setup file?  
  52.  
  53. That way you can store the code in "crammed" format to save disk space, and
  54. convert it to your favorite style to work on it...and everyone can look at
  55. it in *their* preffered format and the arguments over where the braces go,
  56. or how amny columns to use (80? 132? 547?) can disappear forever.
  57.  
  58. Anyone got such a program?  Writing it shouldn't be hard if you can define
  59. the style-definition-file format (user interfaces are always the hardest
  60. part :^).
  61.  
  62.                 -- Mike "class project anyone?" Bartman --
  63.  
  64. ==============================================================================
  65. | I didn't really say all the things that I said.  You probably didn't read  |
  66. | what you thought you read.  Statistics show that this whole thing is more  |
  67. | than likely just a hideous misunderstanding.                     |
  68. ==============================================================================
  69.  
  70. ==============================================================================
  71. Sex is only a pain in the arse if you miss
  72. ------------------------------------------------------------------------------
  73.  
  74.